<template>
    <div>
        <center>
            <el-button-group style="width: 25%">
                <el-button type="primary" icon="el-icon-document" @click="changeFileName('qwe.doc')">word</el-button>
                <el-button type="success" icon="el-icon-s-grid" @click="changeFileName('基本技能操作评分表.xlsx')">excel</el-button>
                <el-button type="warning" icon="el-icon-money" @click="changeFileName('庆.pptx')">ppt</el-button>
                <el-button type="danger" icon="el-icon-folder-opened" @click="changeFileName('doudou1.pdf')">pdf</el-button>
                <el-button type="info" icon="el-icon-picture-outline" @click="changeFileName('applet-homePage-image.png')">image</el-button>
            </el-button-group>
          <iframe style="margin-top: 20px;width: 85%;height: 1000px;overflow: scroll;" :src="viewUrl"/>
        </center>
    </div>
</template>
<script>
import getFileUrl from "./entry"
//拼音


export default {
    data() {
        return {
            url: 'https://ow365.cn?i=32277&ssl=1&furl=https://www.jy-medtechs.com/minio-api/rw-jy/',
            fileName: 'qwe.doc',
            viewUrl: this.url + this.fileName,
        };
    },
    created() {
        //getFileUrl('https://www.jy-medtechs.com/minio-api/rw-jy/qwe.doc');
        this.reName();
    },
    methods: {
        changeFileName(newName){
            this.fileName = newName;
            this.reName();
        },
        reName(){
            this.viewUrl = this.url + this.fileName
        }
    }
};
</script>
